package com.ruoyi.exam.service;

import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.exam.domain.ExamPaperAnswer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.exam.domain.ExamPaperAnswerInfo;
import com.ruoyi.exam.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM;
import com.ruoyi.exam.viewmodel.student.exam.ExamPaperSubmitVM;
import com.ruoyi.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM;

import java.util.List;

/**
 * <p>
 * 试卷答案表 服务类
 * </p>
 *
 * @author JY
 * @since 2024-02-26
 */
public interface IExamPaperAnswerService extends IService<ExamPaperAnswer> {

    /**
     * 学生考试记录分页
     *
     */
    PageInfo<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM requestVM);

    /**
     * 计算试卷提交结果(不入库)
     *
     */
    ExamPaperAnswerInfo calculateExamPaperAnswer(ExamPaperSubmitVM examPaperSubmitVM, SysUser user);


    /**
     * 试卷批改
     * @param examPaperSubmitVM  examPaperSubmitVM
     * @return String
     */
    String judge(ExamPaperSubmitVM examPaperSubmitVM);

    /**
     * 试卷答题信息转成ViewModel 传给前台
     *
     * @param id 试卷id
     */
    ExamPaperSubmitVM examPaperAnswerToVM(Integer id);


    Integer selectAllCount();

    List<Integer> selectMothCount();

    PageInfo<ExamPaperAnswer> adminPage(ExamPaperAnswerPageRequestVM requestVM);

}
